void __init apic_intr_init(void)
{
-#ifdef CONFIG_SMP
smp_intr_init();
-#endif
+
/* self generated IPI for local APIC timer */
set_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
{
u32 l, h;
-#ifdef CONFIG_SMP
unsigned long long value;
/* Disable TLB flush filter by setting HWCR.FFDIS on K8
value |= 1 << 6;
wrmsrl(MSR_K7_HWCR, value);
}
-#endif
/*
* FIXME: We should handle the K5 here. Set up the write
struct set_mtrr_context ctxt;
unsigned char ccr[7];
int ccrc[7] = { 0, 0, 0, 0, 0, 0, 0 };
-#ifdef CONFIG_SMP
int i;
-#endif
/* flush cache and enable MAPEN */
set_mtrr_prepare_save(&ctxt);
ccrc[5] = 1;
setCx86(CX86_CCR5, ccr[5]);
}
-#ifdef CONFIG_SMP
+
for (i = 0; i < 7; i++)
ccr_state[i] = ccr[i];
for (i = 0; i < 8; i++)
cyrix_get_arr(i,
&arr_state[i].base, &arr_state[i].size,
&arr_state[i].type);
-#endif
set_mtrr_done(&ctxt); /* flush cache and disable MAPEN */
*/
int hold_mtrr_updates_on_aps;
-#ifdef CONFIG_SMP
-
static void ipi_handler(void *info)
/* [SUMMARY] Synchronisation handler. Executed by "other" CPUs.
[RETURNS] Nothing.
local_irq_restore(flags);
}
-#endif
-
static inline int types_compatible(mtrr_type type1, mtrr_type type2) {
return type1 == MTRR_TYPE_UNCACHABLE ||
type2 == MTRR_TYPE_UNCACHABLE ||
}
}
-#ifdef CONFIG_SMP
static void
set_ioapic_affinity_irq(struct irq_desc *desc, const cpumask_t *mask)
{
spin_unlock_irqrestore(&ioapic_lock, flags);
}
-#endif /* CONFIG_SMP */
/*
* Find the IRQ entry number of a certain pin.
* we need to reprogram the ioredtbls to cater for the cpus which have come online
* so mask in all cases should simply be TARGET_CPUS
*/
-#ifdef CONFIG_SMP
void /*__init*/ setup_ioapic_dest(void)
{
int pin, ioapic, irq, irq_entry;
}
}
-#endif
/*
* EISA Edge/Level control register, ELCR
return 0;
}
-#ifndef CONFIG_SMP
- *cpu_type = "i386/p4", XENOPROF_CPU_TYPE_SIZE);
- model = &op_p4_spec;
- return 1;
-#else
switch (current_cpu_data.x86_num_siblings) {
case 1:
*cpu_type = "i386/p4";
model = &op_p4_ht2_spec;
return 1;
}
-#endif
+
printk("Xenoprof ERROR: P4 HyperThreading detected with > 2 threads\n");
return 0;
kernel boot-time. */
static inline void setup_num_counters(void)
{
-#ifdef CONFIG_SMP
if (boot_cpu_data.x86_num_siblings == 2) /* XXX */
num_counters = NUM_COUNTERS_HT2;
-#endif
}
static int inline addr_increment(void)
{
-#ifdef CONFIG_SMP
return boot_cpu_data.x86_num_siblings == 2 ? 2 : 1;
-#else
- return 1;
-#endif
}
or "odd" part of all the divided resources. */
static unsigned int get_stagger(void)
{
-#ifdef CONFIG_SMP
int cpu = smp_processor_id();
return (cpu != cpumask_first(per_cpu(cpu_sibling_mask, cpu)));
-#endif
- return 0;
}
}
-#ifdef CONFIG_SMP
struct op_x86_model_spec const op_p4_ht2_spec = {
.num_counters = NUM_COUNTERS_HT2,
.num_controls = NUM_CONTROLS_HT2,
.start = &p4_start,
.stop = &p4_stop
};
-#endif
+
struct op_x86_model_spec const op_p4_spec = {
.num_counters = NUM_COUNTERS_NON_HT,
long blimit; /* Upper limit on a processed batch */
int cpu;
struct rcu_head barrier;
-#ifdef CONFIG_SMP
long last_rs_qlen; /* qlen during the last resched */
-#endif
};
static DEFINE_PER_CPU(struct rcu_data, rcu_data);
#define CONFIG_X86 1
#define CONFIG_X86_HT 1
#define CONFIG_PAGING_ASSISTANCE 1
-#define CONFIG_SMP 1
#define CONFIG_X86_LOCAL_APIC 1
#define CONFIG_X86_GOOD_APIC 1
#define CONFIG_X86_IO_APIC 1
extern struct cpuinfo_x86 boot_cpu_data;
-#ifdef CONFIG_SMP
extern struct cpuinfo_x86 cpu_data[];
#define current_cpu_data cpu_data[smp_processor_id()]
-#else
-#define cpu_data (&boot_cpu_data)
-#define current_cpu_data boot_cpu_data
-#endif
extern void set_cpuid_faulting(bool_t enable);
#endif
#define BAD_APICID -1U
-#ifdef CONFIG_SMP
#ifndef __ASSEMBLY__
/*
#endif /* !__ASSEMBLY__ */
-#else /* CONFIG_SMP */
-
-#define cpu_physical_id(cpu) boot_cpu_physical_apicid
-
-#define NO_PROC_ID 0xFF /* No processor magic marker */
-
-#endif
#endif
#define rmb() barrier()
#define wmb() barrier()
-#ifdef CONFIG_SMP
#define smp_mb() mb()
#define smp_rmb() rmb()
#define smp_wmb() wmb()
-#else
-#define smp_mb() barrier()
-#define smp_rmb() barrier()
-#define smp_wmb() barrier()
-#endif
#define set_mb(var, value) do { xchg(&var, value); } while (0)
#define set_wmb(var, value) do { var = value; wmb(); } while (0)